<template>
  <div class="main">
   <el-button type="primary" style="margin:10px" >新建表单</el-button>
    <el-card v-for="(i, index) in dataList" :key="index" class="box-card">
      <template #header>
        <div class="card-header">
          <span>{{ i.name }}</span>
          <el-button class="button" text @click="edit">编辑</el-button>
        </div>
      </template>
      <div v-for="o in 4" :key="o" class="text item">{{ "List item " + o }}</div>
      <template #footer>
        <el-button class="button" type="danger">删除</el-button>
      </template>
    </el-card>
  </div>
</template>
<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();
const dataList = ref([{ name: "表单1" }]);
const edit = () => {
  console.log(router, 'routeroute');
  router.push({path:'/Online/design/index'})
}
</script>
<style lang="scss" scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 33%;
}
</style>
